import { commonUrl, getRequest, postRequest, deleteRequest, putRequest } from "@/libs/axios";

//获取商品详情
export const getGoodsInfo = (orderSn) => {
    return getRequest(`/order/order/${orderSn}`)
}
//商家收到买家的货，再次发货回寄
export const selldeliverGoods = (afterSaleSn, params) => {
    return postRequest(`/order/afterSale/delivery/${afterSaleSn}`, params)
}

//新增加价购活动
export const addBuyActivity = (params) => {
    let headers = {
        "Content-Type": "application/json"
    };
    return postRequest('/promotion/huangou', params, headers)
}
//修改加价购活动
export const putBuyActivity = (params) => {
    let headers = {
        "Content-Type": "application/json"
    };
    return putRequest('/promotion/huangou', params, headers)
}
//更新加价购活动
export const upBuyActivity = (id, params) => {
    return putRequest(`/promotion/huangou/status/${id}`, params)
}
//根据条件分页查询加价购活动
export const buyActivityList = (params) => {
    return getRequest('/promotion/huangou/byPage', params)
}
//删除 加价购列表 
export const delBuyActivity = (id) => {
    return deleteRequest(`/promotion/huangou/${id}`)
}
//获取 加价购活动详情
export const buyActivityDetail = (id) => {
    return getRequest(`/promotion/huangou/${id}`)
}